#ifndef _CTEXTURE_H
#define _CTEXTURE_H

#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <GL/gl.h>
#include <string.h>
#include <stdio.h>

#include "definitions.h"
//#include "SDL_byteorder.h"


//------------------------------------------------------------------------------
// Texture
// Stores games textures. You can load, bind, etc. your textures
//------------------------------------------------------------------------------
class Texture{

  GLuint  m_Texture;    
  bool  m_bLoaded;
  int   m_iWidth;
  int   m_iHeight;
  Log  *m_pLog;
  char  m_filename[255];
  
public:

  Texture();
  ~Texture();
  bool init(const char *_filename);
  void bind();
  void freeMemory();
  
  /*---------------------------------
    get functions (inline)
  ---------------------------------*/
  inline bool   getLoaded() {return m_bLoaded;}
  inline GLuint getTexture(){return m_Texture;}
  inline int    getWidth()  {return m_iWidth;}
  inline int    getHeight() {return m_iHeight;}
  inline char * getFileName(){return m_filename;}
};

#endif
